From: Colin Walters Date: Wed, 21 Jan 2009 22:37:02 +0000 (+0000) Subject: Bug 568625: Ignore extra whitespace in search X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~11480 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=5280decb59a3d57c18ab28d9843571e4305ade94;p=gnome-shell.git Bug 568625: Ignore extra whitespace in search svn path=/trunk/; revision=162 --- diff --git a/js/ui/overlay.js b/js/ui/overlay.js index ba7ec0b33..84644da4f 100644 --- a/js/ui/overlay.js +++ b/js/ui/overlay.js @@ -99,7 +99,11 @@ Sideshow.prototype = { this._searchEntry.connect('key-press-event', function (se, e) { let code = e.get_code(); if (code == 9) { - me._searchEntry.text = ''; + // A single escape clears the entry, two of them hides the overlay + if (me._searchEntry.text == '') + me.emit('activated'); + else + me._searchEntry.text = ''; return true; } else if (code == 111) { // selectUp and selectDown wrap around in their respective displays